//
//  bendititleTableViewCell.m
//  hainingOASystem
//
//  Created by michael on 2017/11/17.
//  Copyright © 2017年 czd. All rights reserved.
//

#import "bendititleTableViewCell.h"

@implementation bendititleTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
//self.bgView  = [[UIView alloc]init];
//  [self.contentView addSubview:_bgView];
 _label1 = [[UILabel alloc]init];
    _label1.frame = CGRectZero;
    
      [_label1 setFont:[UIFont systemFontOfSize:13]];
          _label1.numberOfLines = 0;

       [self.contentView addSubview:_label1];
    
//       _label2 = [[UILabel alloc]init];
//    _label2.frame = CGRectZero;
//    _label2.numberOfLines = 0;
//      [_label2 setFont:[UIFont systemFontOfSize:12]];
//       [self.contentView addSubview:_label2];
    
       _label3 = [[UILabel alloc]init];
    _label3.frame = CGRectZero;
      [_label3 setFont:[UIFont systemFontOfSize:12]];
       [self.contentView addSubview:_label3];
    


}

return self;

}

- (void)layoutSubviews{
[super layoutSubviews];
// 80+10+10= 100
//_image.frame  = CGRectMake(KScreenWidth-100-20, 10, 100, 80);
//NSString *url = [NSString stringWithFormat:@"%@%@",kip,_dic[@"defaultPicUrl"]];
//    [self.image sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:[UIImage imageNamed:@"加载"]];
//    self.bgView.backgroundColor = [UIColor whiteColor];
//    //给bgView边框设置阴影
//    self.bgView.layer.shadowOffset = CGSizeMake(1,1);
//    self.bgView.layer.shadowOpacity = 0.3;
//    self.bgView.layer.shadowColor = [UIColor blackColor].CGColor;
//        self.bgView.layer.cornerRadius = 5;
_label1.frame =CGRectMake(10, 0, KScreenWidth-120, 20);
//  self.bgView.frame =  CGRectMake(5, 5, KScreenWidth - 10, 90);

_label1.textColor = [UIColor blackColor];//其中textColor要用UIColor类型
_label1.text = [NSString stringWithFormat:@"%@",_dic[@"name"]];
//if (![_dic[@"Intro"] isEqual:[NSNull null]]) {
//    _label2.frame =CGRectMake(10, _label1.bottom,KScreenWidth-20,40);
//_label2.textColor = [UIColor blackColor];//其中textColor要用UIColor类型
////_label2.text = [NSString stringWithFormat:@"%@",_dic[@"Intro"]];
//_label2.text = _dic[@"Intro"];
//
//}

_label3.frame =CGRectMake(_label1.right,0,100, 20);
_label3.textColor = [UIColor grayColor];//其中textColor要用UIColor类型
_label3.textAlignment = NSTextAlignmentRight;

NSString *string =[NSString stringWithFormat:@"%@",_dic[@"createDate"]];
if (string.length>10) {
    string = [string substringToIndex:10];//截取掉下标7之后的字符串

}else{


}

_label3.text =string ;

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
